Ext.isArray = function(obj) {
	if (!obj) {
		return;
	};

	return obj.constructor == Array;
};

Array.prototype.compareArrays = function(arr) {
	if (this.length != arr.length)
		return false;
	for (var i = 0; i < arr.length; i++) {
		if (this[i].compareArrays) { // likely nested array
			if (!this[i].compareArrays(arr[i]))
				return false;
			else
				continue;
		}
		if (this[i] != arr[i])
			return false;
	}
	return true;
};

Array.prototype.hasObject = (!Array.indexOf ? function(o) {
	var l = this.length + 1;
	while (l -= 1) {
		if (this[l - 1] === o) {
			return true;
		}
	}
	return false;
} : function(o) {
	return (this.indexOf(o) !== -1);
});